<!--
 * @Author: luobei luobei@seewintech.com
 * @Date: 2023-02-23 20:43:19
 * @LastEditors: luobei luobei@seewintech.com
 * @LastEditTime: 2023-02-24 15:00:54
 * @FilePath: \ibuilds-web-system\src\views\systemManage\formManage\formDesign\packages\config\date.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <template v-if="data.type.indexOf('range') != -1">
      <el-form-item label="开始占位内容" label-width="110px">
        <el-input
          v-model="data.startPlaceholder"
          clearable
          placeholder="开始占位内容"
        />
      </el-form-item>
      <el-form-item label="结束占位内容" label-width="110px">
        <el-input
          v-model="data.endPlaceholder"
          clearable
          placeholder="结束占位内容"
        />
      </el-form-item>
    </template>
    <el-form-item v-else label="占位内容">
      <el-input
        v-model="data.placeholder"
        clearable
        placeholder="占位内容"
      />
    </el-form-item>
    <el-form-item label="显示格式化" label-width="100px">
      <el-input
        v-model="data.format"
        clearable
        placeholder="显示格式化"
      />
    </el-form-item>
    <el-form-item label="值格式化">
      <el-input
        v-model="data.valueFormat"
        clearable
        placeholder="值格式化"
      />
    </el-form-item>
    <el-form-item
      v-if="['timerange', 'daterange', 'datetimerange'].includes(data.type)"
      label="取消范围联动"
      label-width="110px"
    >
      <el-switch v-model="data.unlinkPanels" />
    </el-form-item>
  </div>
</template>

<script>
  export default {
    name: 'ConfigDate',
    props: ['data'],
  }
</script>
